<?php
class Adm_View_Helper_FilterCategoria
	extends Zend_View_Helper_FormSelect
{

	public function filterCategoria()
	{
		$options = array();
		
		foreach ($this->view->categorias as $categoria){
			
			$letra = substr($categoria, 0, 1);
			
			$options[$letra][$categoria->idCategoria] = $categoria->__toString();
		}
		
		ksort( $options );
		
		foreach($options as &$option){
			asort($option);
		}
		
		$options = array_merge(array($this->view->translate("allsF")), $options);
		
		return $this->formSelect('idCategoria', $this->view->idCategoria, array('class'=>'paginatorFilter'), $options);
	}


}